#ifndef __RUNCODE_H__
#define __RUNCODE_H__
#include "../utility/ojData.h"
#include "../utility/fileio.h"
#include "../utility/log.h"
#include "../utility/options.h"
#include "../utility/defer.h"
#include "../utility/os.h"
#include "../utility/md5.h"
#include "../judge_events/run_code_params.h"
#include "../judge_events/event_context.hpp"
#include "../judge_types/baseJudge.hpp"
#include "../languages/baseLang.h"
#include <fstream>
#include <iterator>
#include <ostream>
#include <unordered_map>
#include <unordered_set>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <memory>
#include <string.h>
#include <iostream>
#include <variant>
#include <future>
#include <algorithm>
#include <type_traits>
#include <algorithm>
#include <filesystem>
#include <tuple>
#include <optional>
#include <functional>

using std::string;
using std::operator""s;
using std::cout;
using std::endl;
using std::make_tuple;
using std::cref;    
using std::max;


int parse_run_params(struct RuncodeParams& run_params, JsonObjectPtr data);

ProcessStatus runJudge( std::string language, 
                        int judgeType, 
                        std::string filename, 
                        std::string initPath,
                        std::string dataPath, 
                        std::string spjPath,
                        int timeLimit, 
                        int memoryLimit, 
                        int compareFlag, 
                        int ruler,
                        int querySet,
                        std::string eps,
                        std::string userCachePath,
                        std::string spjCachePath
                        );
ProcessStatus runJudge(const RuncodeParams &params);


#endif /* __RUNCODE_H__ */
